//
//  CommonTipsView.m
//  Ginix
//
//  Created by 冯志强 on 2025/2/14.
//

#import "CommonTipsView.h"

@interface CommonTipsView()
@property (nonatomic,strong) UIImageView    * iconView;
@property (nonatomic,strong) UILabel        * infoLabel;
@end

@implementation CommonTipsView

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        [self setSubViewLayout];
    }
    return self;
}
-(void)setSubViewLayout{
    
    [self addSubview:self.iconView];
    [self addSubview:self.infoLabel];
}

-(void)setInfoText:(NSString *)infoText{
    
    self.infoLabel.text = infoText;
    
}

-(UIImageView *)iconView{
    
    if (!_iconView) {
        _iconView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.getWidth, self.getHeight)];
        _iconView.image = [UIImage imageNamed:@"Common_tips_icon"];
    }
    return _iconView;
}
-(UILabel *)infoLabel{
    
    if (!_infoLabel) {
        _infoLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.getWidth, self.getHeight)];
        _infoLabel.textAlignment = NSTextAlignmentCenter;
        _infoLabel.font = Semibold(15);
        _infoLabel.textColor = RDRGB(0x9A7742);
    }
    return _infoLabel;
}

@end
